package QL;

import java.util.Map;

public class ButlerMailSendRequest implements IQLRequest
{
    /// <summary>
    /// 区服Id
    /// </summary>
    public long ZoneId;

    /// <summary>
    /// 发送类型 1发送给所有玩家 2发送给指定玩家
    /// </summary>
    public long SendType;

    /// <summary>
    /// 接收者Id
    /// </summary>
    public long ReceiverId;

    /// <summary>
    /// 邮件标题
    /// </summary>
    public String Title;

    /// <summary>
    /// 邮件内容
    /// </summary>
    public String Content;

    /// <summary>
    /// 附件物品（Json格式），如果不需要附件该字段留空
    /// 附件格式：
    /// [[0,2,1000],[0,1,100]]
    /// </summary>
    public String Items;

    /// <summary>
    /// 邮件有效期，单位：天
    /// </summary>
    public long ValidationTime;

    @Override
    public String GetApiName()
    {
        return "butler.mail.send";
    }

    @Override
    public void Validate()
    {
    }

    @Override
    public void AddParameters(Map<String, String> map)
    {
        map.put("zone_id", String.valueOf(ZoneId));
        map.put("send_type", String.valueOf(SendType));
        map.put("receiver_id", String.valueOf(ReceiverId));
        map.put("title", Title);
        map.put("content", Content);
        map.put("items", Items);
        map.put("validation_time", String.valueOf(ValidationTime));
    }
}
